package com.game.model;

import com.game.model.api.Property;
import com.game.utils.Format;

/**
 * @Description:特殊属性
 **/
public class SpecialProperty implements Property {
    private int id;
    private int HIT;//命中率
    private int CRI;//暴击
    private int AVO;//闪避
    private int CHR;//暴击抵抗

    public String printInfo(){
        return "[命中:"+HIT+",暴击:"+CRI+",闪避:"+AVO+",韧性:"+CHR+"]";
    }

    public SpecialProperty() {
    }

    public SpecialProperty(int id, int HIT, int CRI, int AVO, int CHR) {
        this.id = id;
        this.HIT = HIT;
        this.CRI = CRI;
        this.AVO = AVO;
        this.CHR = CHR;
    }

    public SpecialProperty(int HIT, int CRI, int AVO, int CHR) {
        this.id = Format.getRandomNumber();
        this.HIT = HIT;
        this.CRI = CRI;
        this.AVO = AVO;
        this.CHR = CHR;
    }

    @Override
    public Property getProperty() {
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getHIT() {
        return HIT;
    }

    public void setHIT(int HIT) {
        this.HIT = HIT;
    }

    public int getCRI() {
        return CRI;
    }

    public void setCRI(int CRI) {
        this.CRI = CRI;
    }

    public int getAVO() {
        return AVO;
    }

    public void setAVO(int AVO) {
        this.AVO = AVO;
    }

    public int getCHR() {
        return CHR;
    }

    public void setCHR(int CHR) {
        this.CHR = CHR;
    }

    @Override
    public String toString() {
        return "SpecialProperty{" +
                "id=" + id +
                ", HIT=" + HIT +
                ", CRI=" + CRI +
                ", AVO=" + AVO +
                ", CHR=" + CHR +
                '}';
    }
}
